// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   tablec_save.java

package finance.reports;

import include.nseer_db.nseer_db_backup1;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import javax.servlet.jsp.JspFactory;

public class tablec_save extends HttpServlet
{

	public tablec_save()
	{
	}

	public synchronized void service(HttpServletRequest request, HttpServletResponse response)
		throws IOException, ServletException
	{
		HttpSession dbSession = request.getSession();
		JspFactory _jspxFactory = JspFactory.getDefaultFactory();
		javax.servlet.jsp.PageContext pageContext = _jspxFactory.getPageContext(this, request, response, "", true, 8192, true);
		javax.servlet.ServletContext dbApplication = dbSession.getServletContext();
		HttpSession session = request.getSession();
		nseer_db_backup1 finance_db = new nseer_db_backup1(dbApplication);
		try
		{
			if (finance_db.conn((String)dbSession.getAttribute("unit_db_name")))
			{
				String finance_time = request.getParameter("finance_time");
				String report_unit = request.getParameter("report_unit");
				String year = finance_time.substring(0, 4);
				String month = finance_time.substring(5, 7);
				String day = finance_time.substring(8, 10);
				String item_year1 = request.getParameter("item_year1");
				String item_year8 = request.getParameter("item_year8");
				String item_year9 = request.getParameter("item_year9");
				String item_year10 = request.getParameter("item_year10");
				String item_year12 = request.getParameter("item_year12");
				String item_year13 = request.getParameter("item_year13");
				String item_year18 = request.getParameter("item_year18");
				String item_year20 = request.getParameter("item_year20");
				String item_year21 = request.getParameter("item_year21");
				String item_year22 = request.getParameter("item_year22");
				String item_year23 = request.getParameter("item_year23");
				String item_year25 = request.getParameter("item_year25");
				String item_year28 = request.getParameter("item_year28");
				String item_year29 = request.getParameter("item_year29");
				String item_year30 = request.getParameter("item_year30");
				String item_year31 = request.getParameter("item_year31");
				String item_year35 = request.getParameter("item_year35");
				String item_year36 = request.getParameter("item_year36");
				String item_year37 = request.getParameter("item_year37");
				String item_year38 = request.getParameter("item_year38");
				String item_year40 = request.getParameter("item_year40");
				String item_year43 = request.getParameter("item_year43");
				String item_year44 = request.getParameter("item_year44");
				String item_year45 = request.getParameter("item_year45");
				String item_year46 = request.getParameter("item_year46");
				String item_year52 = request.getParameter("item_year52");
				String item_year53 = request.getParameter("item_year53");
				String item_year54 = request.getParameter("item_year54");
				String item_year55 = request.getParameter("item_year55");
				String item_year56 = request.getParameter("item_year56");
				String item_year57 = request.getParameter("item_year57");
				String item_year58 = request.getParameter("item_year58");
				String item_year59 = request.getParameter("item_year59");
				String item_year60 = request.getParameter("item_year60");
				String item_year61 = request.getParameter("item_year61");
				String item_year64 = request.getParameter("item_year64");
				String item_year65 = request.getParameter("item_year65");
				String item_year66 = request.getParameter("item_year66");
				String item_year67 = request.getParameter("item_year67");
				String item_year68 = request.getParameter("item_year68");
				String item_year69 = request.getParameter("item_year69");
				String item_year70 = request.getParameter("item_year70");
				String item_year71 = request.getParameter("item_year71");
				String item_year72 = request.getParameter("item_year72");
				String item_year73 = request.getParameter("item_year73");
				String item_year74 = request.getParameter("item_year74");
				String item_year75 = request.getParameter("item_year75");
				String item_year76 = request.getParameter("item_year76");
				String item_year77 = request.getParameter("item_year77");
				String item_year78 = request.getParameter("item_year78");
				String item_year79 = request.getParameter("item_year79");
				String item_year80 = request.getParameter("item_year80");
				String item_year81 = request.getParameter("item_year81");
				String item_year82 = request.getParameter("item_year82");
				String item_year83 = request.getParameter("item_year83");
				String sql1 = (new StringBuilder("delete from finance_report_03 where year='")).append(year).append("' and month='").append(month).append("'").toString();
				finance_db.executeUpdate(sql1);
				String sql = (new StringBuilder("insert into finance_report_03(report_unit,year,month,day,item_year1,item_year8,item_year9,item_year10,item_year12,item_year13,item_year18,item_year20,item_year21,item_year22,item_year23,item_year25,item_year28,item_year29,item_year30,item_year31,item_year35,item_year36,item_year37,item_year38,item_year40,item_year43,item_year44,item_year45,item_year46,item_year52,item_year53,item_year54,item_year55,item_year56,item_year57,item_year58,item_year59,item_year60,item_year61,item_year64,item_year65,item_year66,item_year67,item_year68,item_year69,item_year70,item_year71,item_year72,item_year73,item_year74,item_year75,item_year76,item_year77,item_year78,item_year79,item_year80,item_year81,item_year82,item_year83) values('")).append(report_unit).append("','").append(year).append("','").append(month).append("','").append(day).append("','").append(item_year1).append("','").append(item_year8).append("','").append(item_year9).append("','").append(item_year10).append("','").append(item_year12).append("','").append(item_year13).append("','").append(item_year18).append("','").append(item_year20).append("','").append(item_year21).append("','").append(item_year22).append("','").append(item_year23).append("','").append(item_year25).append("','").append(item_year28).append("','").append(item_year29).append("','").append(item_year30).append("','").append(item_year31).append("','").append(item_year35).append("','").append(item_year36).append("','").append(item_year37).append("','").append(item_year38).append("','").append(item_year40).append("','").append(item_year43).append("','").append(item_year44).append("','").append(item_year45).append("','").append(item_year46).append("','").append(item_year52).append("','").append(item_year53).append("','").append(item_year54).append("','").append(item_year55).append("','").append(item_year56).append("','").append(item_year57).append("','").append(item_year58).append("','").append(item_year59).append("','").append(item_year60).append("','").append(item_year61).append("','").append(item_year64).append("','").append(item_year65).append("','").append(item_year66).append("','").append(item_year67).append("','").append(item_year68).append("','").append(item_year69).append("','").append(item_year70).append("','").append(item_year71).append("','").append(item_year72).append("','").append(item_year73).append("','").append(item_year74).append("','").append(item_year75).append("','").append(item_year76).append("','").append(item_year77).append("','").append(item_year78).append("','").append(item_year79).append("','").append(item_year80).append("','").append(item_year81).append("','").append(item_year82).append("','").append(item_year83).append("')").toString();
				finance_db.executeUpdate(sql);
				finance_db.commit();
				finance_db.close();
				response.sendRedirect("finance/reports/tablec_save_a.jsp");
			} else
			{
				response.sendRedirect("error_conn.htm");
			}
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
	}
}
